import requests
from lxml import etree

url = "https://blog.sina.com.cn/s/blog_01ebcb8a0102zitk.html"
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36',
    'Referer': 'https://blog.sina.com.cn/s/blog_01ebcb8a0102zitk.html'}

res_html = requests.get(url=url, headers=headers).text
tree = etree.HTML(res_html)

# img_list = tree.xpath('//img/@real_src')
img_list = tree.xpath('//*[@id="sina_keyword_ad_area2"]/a/img/@real_src')

for img in img_list:
    print(img)
    data = requests.get(url=img, headers=headers).content
    with open('./img/133.jpg', 'wb') as fp:
        fp.write(data)
        break
